package csel.controller.bindings;

import java.io.IOException;

import csel.controller.enums.ActionEnum;

/**
 * Defines the interface for changing Key Bindings
 */
public interface Bindable
{
	/**
	 * Precondition: ActionEnum exists, and Integer is a real Virtual Key
	 * PostCondition: The passed virtual key will MAP to the ActionEnum in 
	 * the controller
	 * 
	 * @param virtualKey
	 * @param actionEnum
	 */
	public void changeBinding( Integer virtualKey, ActionEnum actionEnum );
	
	/**
	 * Precondition: We're satisfied with these bindings
	 * PostConditions: These bindings will be in a file of the specified name
	 * 
	 * @param fileName	
	 * @throws IOException 
	 */
	public void saveBindings( String fileName ) throws IOException;
	
	/**
	 * Precondition: We're unsatisfied with current bindings
	 * PostConditions: The bindings in the file will be ours when this completes
	 * 
	 * @param fileName	
	 * @throws IOException 
	 */
	public void loadBindings( String fileName ) throws IOException;
}
